package main

import "log"

type test struct {
	s []int
	m map[int]int
}

func newTest() *test {
	return &test{
		s: []int{1, 2, 3},
		m: map[int]int{1: 1, 2: 2, 3: 3},
	}
}

func (t test) S() []int {
	return t.s
}

func (t test) M() map[int]int {
	return t.m
}

func main() {
	t := newTest()
	s := t.S()
	s = append(s, 4)
	log.Printf("%#v", t.S())
	delete(t.M(), 1)
	log.Printf("%#v", t.M())
}
